BBQPage.render   B
last analyzed

Complexity

Conditions 1

Size

Total Lines 55
Code Lines 49

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 49
dl 0
loc 55
c 0
b 0
f 0
rs 8.669
cc 1

How to fix   Long Method   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
import { StaticImage } from "gatsby-plugin-image";
2
import React, { Component } from "react";
3
4
import SEO from "../components/seo";
5
import Layout from "../layouts/index";
6
7
class BBQPage extends Component {
8
  render() {
9
    return (
10
      <Layout>
11
        <SEO
12
          lang="nl-BE"
13
          title="BBQ - Inschrijvinsformulier"
14
          description="BBQ - Inschrijvinsformulier"
15
          path={this.props.location.pathname}
16
        />
17
        <div className={`limited-width_wrapper`}>
18
          <header>
19
            <h1>Winterbarbecue - Inschrijving</h1>
20
          </header>
21
          <main>
22
            <h2>Zaterdag 4 december 2021 // 18:30</h2>
23
            <p>
24
              De jeugd van KCVV Elewijt presenteert zijn jaarlijkse
25
              winterbarbecue
26
            </p>
27
            <p>
28
              Voor de prijs van 25 euro per volwassene en 15 euro per kind kan
29
              je genieten van
30
            </p>
31
            <ul>
32
              <li>3 stukken vlees (kinderen 2 stukken)</li>
33
              <li>Saladbar</li>
34
              <li>Pasta</li>
35
              <li>Sauzen</li>
36
              <li>Brood</li>
37
            </ul>
38
            <p>
39
              Door de geldende Corona-maatregelen is het verplicht om op
40
              voorhand een tafel met je bubbel/gezin te reserveren. Inschrijven
41
              kan tot en met 2 december 2021.
42
            </p>
43
44
            <tbkr-bm-widget
45
              restaurant-id="34742560"
46
              source="website"
47
              use-modal="0"
48
              lang="nl"
49
              theme="light"
50
              primary-color="#4b9b48"
51
              takeaway="0"
52
            ></tbkr-bm-widget>
53
            <script src="https://reservations.tablebooker.com/tbkr-widget-import.min.js"></script>
54
55
            <StaticImage
56
              src="../images/bbq2021.jpg"
57
              alt="Barbecue 2021"
58
              placeholder="blurred"
59
            />
60
          </main>
61
        </div>
62
      </Layout>
63
    );
64
  }
65
}
66
67
export default BBQPage;
68